X11: Pick better system and rgba visuals for GL
authorAlexander Larsson <alexl@redhat.com>
Wed, 29 Oct 2014 11:35:07 +0000 (12:35 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 29 Oct 2014 12:35:17 +0000 (13:35 +0100)
commitdae447728db32a5a7162d9216f2e2343837cbae4
tree70dd96876a0cea6185554c307038138349cb24bd
parent8765970ba141ef47af7e1dab856188361c2e6c0b
X11: Pick better system and rgba visuals for GL

We want to create windows with the default visuals such that we then
have the right visual for GLX when we want to create the paint GL
context for the window.

For instance, (in bug 738670) the default rgba visual we picked for the
NVidia driver had an alpha size of 0 which gave us a BadMatch when later
trying to initialize a gl context on it with a alpha FBConfig.

Instead of just picking what the Xserver likes for the default, and just
picking the first rgba visual we now actually call into GLX to pick
an appropriate visual.
gdk/x11/gdkdisplay-x11.h
gdk/x11/gdkglcontext-x11.c
gdk/x11/gdkglcontext-x11.h
gdk/x11/gdkscreen-x11.h
gdk/x11/gdkvisual-x11.c